# @Time    :2025/4/1 16:07
try:
    with open("test.txt", "w") as f:
        f.write(a)
finally:
    print("文件是否关闭：", f.closed)
